I've got a bit of a dxl project setup code.
//
/*
*/
string message
// CLP - Set the current folder to be the database root
current = folder "/"
void ProjectTemp(DB fieldBox)
{
string projname = get zip
string projdesc = get description
if (isValidName projname)
{
// string template = getenv("Home")
string template = "//server/folder/archive.dpa"
string message = restoreProject(template, projname, projdesc)
if (length(message)>8)
{
if(message[0:8] == "duplicate")
{
infoBox "This Project name is already used in Database"
}
else if(message[0:18] == "Insufficient access")
{
infoBox "You have insufficient access to create a new project. \nPlease contact your DOORS Administrator for assistance."
}
}
else
{
release fieldBox
}
}
else
{
infoBox "You have requested an invalid project name."
}
refreshDBExplorer()
return
}
apply(fieldBox, "OK", ProjectTemp)
block fieldBox
destroy fieldBox
fieldBox = null
liamc - Wed May 05 08:29:03 EDT 2010 |
Re: DXL restoreProject is circumnavigating user permissions ??? |
Re: DXL restoreProject is circumnavigating user permissions ??? Now, beginning v8.0 I think, AccessRecords are erased in archives and everything is 'Inherited'; I presume that's done when Archiving and not when Restoring. Preserving the access rights only makes sense when the two databases have the same exact User database; which pretty much only happens when its restored in the SAME database. Perhaps that would make sense; preserve access rights when restoring if it came from the same database. Even that may have pit-falls, as the rights may have changed during the two months the project was archived. Yup, you need to restore your access rights; the lesser of 3 weavols. Cannot help you there.
Maybe I should write some script to attempt to restore accesses, based on name, for archives. Let me think: the 'Get' script plows through everything looking for 'Specific' access and stores to a file: folder names, module names, object AbsNo, view names, attr Defs/Values/Types, name, id, and rights. the 'Put' script plows through the existing database, and for everthing therein if it finds an exact match it sets the thing to Specific with those exact rights. Missing rights in the Get text file are recorded. Glorified, the user can enter 'Matching' options, where perhaps the old user 'Honest' is matched with a new user 'Very Honest'; or old module A1 is really new module A1a. However, it may be easier to just edit and mass replace such text in the Get file. |
Re: DXL restoreProject is circumnavigating user permissions ??? Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |
Re: DXL restoreProject is circumnavigating user permissions ??? In 9.2, it seems, from trying several times in several databases using several accounts, that ALL users can use restoreProject. (Despite the fact that "create new project" is greyed out in the menu for the users.) This is not good. |
Re: DXL restoreProject is circumnavigating user permissions ??? liamc - Wed May 05 16:33:09 EDT 2010 I see that when I first attempted v8.1, it would fail to 'restore' giving error 'Archive filename extension invalid'; which turns out to be because I was attempting to restore a v9.1 project in a v8.1 database; bad error message. It worked for a v8.1 archive however. I see a user cannot 'restore' unless they posses 'C'reate rights to the folder they are in, producing error 'Insufficient access to restore to this location'. I see no change in behavior.
|